<!DOCTYPE html>
<html>
<head>
	<!--[if IE]><script src="js/explorercanvas/excanvas.js"></script><![endif]-->
	<script src="js/jsgamesoup.js"></script>
<script>
function startGame(gs) {
		function A(start) {
			this.x = 100;
			this.y = start || 100;
			this.draw = function(c, gs) {
				c.strokeStyle = 'rgba(150, 150, 150, 1.0)';
				this.y = this.y - 1;
				if (this.y < 0) {
					this.y = gs.canvas.height;
				}
				c.beginPath();
				c.moveTo(this.x - 50, this.y);
				c.lineTo(this.x + 50, this.y);
				c.stroke();
			}
		}
		
		function World() {
			this.update = function(gs) {
				if (gs.frameCount == 1 || gs.frameCount == 100 || gs.frameCount == 150) {
					gs.addEntity(new A(10));
				}
			}
			
			this.draw = function() {
				gs.clear();
			}
		}
		
		gs.addEntity(new World());
}
</script>
</head>
<body style="height: 100%; margin: 0; overflow: hidden;">
<canvas id='surface' jsgs='startGame'></canvas>
</body>
</html>

